package com.ruoyi.carShop.service.impl;

import com.ruoyi.carShop.mapper.ShopOrderDetailsMapper;
import com.ruoyi.carShop.service.IShopOrderDetailsService;
import com.ruoyi.system.api.domain.OrderDetails;
import com.ruoyi.system.api.domain.ServiceDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ShopOrderDetailsImpl implements IShopOrderDetailsService {
    @Autowired
    private ShopOrderDetailsMapper ShopOrderDetailsMapper;
    @Override
    public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails) {
        return ShopOrderDetailsMapper.selectOrderDetailsList(orderDetails);
    }

    @Override
    public OrderDetails  selectOrderDetailsByOrderDetailsId(Long orderDetailsId) {
        return ShopOrderDetailsMapper.selectOrderDetailsByOrderDetailsId(orderDetailsId);
    }

    @Override
    public List<ServiceDetails> selectNameAndPrice(Long orderDetailsId) {
        return ShopOrderDetailsMapper.selectNameAndPrice(orderDetailsId);
    }

    @Override
    public Integer updateVerificationById(Long orderDetailsId, Date verificationTime) {
        return ShopOrderDetailsMapper.updateVerificationById(orderDetailsId,verificationTime);
    }
}
